/* GZIP by Raccoon Framework */ /* main.js */ var _ = {}; _.extend = jQuery.extend; var alert_old = window.alert; /*var alert = function(message, callback) { $.blockUI({ message: "" + "
"+message+"
" + "" + ""+message+"
" + "
"
});
}
_.extend({
mail_regexp : /^[a-zA-Z][\w\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$/,
alert : function(message, callback) {
$.blockUI({
message: ""
+ ""+message+"
" + "" + ""+message+"
" + "" + "" + ""+message+"
" + "
"
});
},
search: function()
{
var busqueda = $('#campo_buscar').val();
window.location.href = RCN.url + 'index.php/page,search/for,' + encodeURI(busqueda);
},
browser: function()
{
// IE 6 o inferior
if ($.browser.msie && $.browser.version.match(/^[0-6]/))
{
window.location.href = RCN.url + '/ie';
}
}
});
/* users.js */
_.extend({
users: {
map:null,
login: function(page)
{
$.blockUI({
message: $('#login'),
css: {
width: '400px',
height: '200px'
}
});
$('#login #login_cancel').click(function(){
$('#login #login_error_msg').html('');
$.unblockUI();
});
$('#login #login_send').click(function() {
$('#login #login_error_msg').html('Procesando...');
$.post("index.php/mode,json/control,Users.validateLogin/",
{
email: $('input#login_email').val(),
password: $('input#login_password').val()
},
function(json) {
if (json.status === "201")
{
if(page==undefined)
window.location.reload();
else
location.href = RCN.url+'index.php/page,'+page;
}
else if (json.status === "301")
{
$('#login #login_error_msg').html('Cuenta INACTIVA, se envió un correo con instrucciones para su activación.');
}
else
{
$('#login #login_error_msg').html('Correo o contraseña incorrectos');
}
},
"json");
});
},
logout: function() {
$.post("index.php/mode,json/control,Users.logOut/", function() {
location.href = RCN.url + "index.php";
});
},
addBookmark: function(id){
$.post("index.php/mode,json/control,Users.addBookmark", {id_property:id}, function(json) {
if (json.status == 201)
{
$("#bookmark_button").attr("onclick","");
$("#bookmark_button").attr("title","Eliminar de favoritos");
$("#div_property").attr("class","detail_favorite");
$("#bookmark_button").unbind("click");
$("#bookmark_button").click(function () {_.users.delBookmark(id);});
}
else
alert("Necesitas registrarte para poder agregar a Favoritos
Necesitas registrarte para poder agregar a Favoritos
Hemos enviado un correo con instrucciones para la activación de tu cuenta.
Ha sido enviado un correo con las instrucciones para activar tu cuenta. Es posible que haya llegado al correo no deseado.
Tu información ha sido actualizada